public class test2 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if(i % 10 == 9) {//判断个位的9
                count++;
            }
            if(i/10 == 9) {
                count++;//判断十位的9
            }
        }
        System.out.println(count);
    }
}
